<template>
	<view class="content">

		<view class="bottomPart">
			<block v-for="(item,index) in rankList" :key="index">
				<view class="listItem">
					<view class="leftPart">
						<!-- <image class="idolAvatar" :src="item.id"></image> -->
						<view class="mineSpotId">Id：{{item.id}}</view>
						<view class="name">微信号：{{item.wechatNumber}}</view>
					</view>
					<view class="rightPart">
						<view class="name">{{item.sex}}</view>
						<!-- <view class="heatNum">
							<view class="heatLogo"></view>{{item.sex}}
						</view> -->
					</view>
				</view>
				<view class="divideLine"></view>
			</block>
		</view>
	</view>
	</view>
</template>

<script>
	import API from '@/api/api.js';
	export default {
		data() {
			return {
				rankList: [],
				page: 1,
				isLastPage: false,
			}
		},
		onLoad() {
			this.getMineNode({
				size: 20
			})
		},
		onReachBottom() {
			if (!this.isLastPage) {
				this.getMineNode({
					size: 20,
					page: this.page
				})
			}
		},
		methods: {
			getCreditsRank: function(data) {
				API.creditRank(data).then(res => {
						//console.log(res)
						if (res.length < 20) {
							this.isLastPage = true
						}
						this.page = this.page + 1
						this.rankList = this.rankList.concat(res)

					})
					.catch(err => {
						console.log(err)
					})
			},
			getMineNode: function(data) {
				API.getMineSpot(data).then(res => {
						console.log(res)
						if (res.content.length < 20) {
							this.isLastPage = true
						}
						this.page = this.page + 1
						this.rankList = this.rankList.concat(res.content)
			
					})
					.catch(err => {
						console.log(err)
					})
			}
		}
	}
</script>

<style>
	/* 底部列表 **/

	.content{
		/* width: 400rpx; */
	}
	.bottomPart {
		margin-left: 20rpx;
		min-width: 600rpx;
		min-height: 600rpx;
		display: flex;
		flex-flow: column;
		align-items: center;
	}


	.listItem {
		min-width: 600rpx;
		height: 96rpx;
		justify-content: space-between;
	}

	.leftPart,
	.listItem,
	.rightPart {
		display: flex;
		flex-flow: row nowrap;
		align-items: center;
	}



	.rightPart {
		padding-right: 20rpx;
		justify-content: flex-end;
	}

	.ranking {
		width: 90rpx;
		height: 40rpx;
		line-height: 40rpx;
		font-size: 24rpx;
		color: #333;
		text-align: center;
	}

	.listItem .name {
		font-size: 28rpx;
		color: #333;
		font-weight: 400;
	}
	.listItem .mineSpotId {
		font-size: 28rpx;
		color: #333;
		font-weight: 400;
		margin-right: 20rpx;
	}


	.horizontal {
		display: flex;
		flex-flow: row nowrap;
		justify-content: center;
		align-items: center;
	}

	.vote {
		margin: 0;
		padding: 0;
		width: 110rpx;
		height: 40rpx;
		line-height: 40rpx;
		font-weight: 700;
		border-radius: 20rpx;
		font-size: 24rpx;
		color: #fff;
		text-align: center;
		background: linear-gradient(90deg, #ff607c, #ff717f 17%, #ffaf89 78%, #ffc58c);
	}

	.vote:after {
		border: none;
	}



	.idolInfo {
		display: inline-block;
		vertical-align: top;
		padding-top: 18rpx;
		padding-bottom: 16rpx;
		width: 190rpx;
		height: 62rpx;
	}

	.idolInfo .name {
		line-height: 34rpx;
		font-size: 24rpx;
	}

	.idolInfo .heatNum,
	.idolInfo .name {
		color: #333;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.idolInfo .heatNum {
		line-height: 28rpx;
		opacity: .7;
		font-size: 20rpx;
	}

	.idolBox .deleteIdol {
		position: absolute;
		top: -25rpx;
		right: -25rpx;
		width: 88rpx;
		height: 88rpx;
		background: url(https://ohudong.cztv.com/1/257934/images/removeIdol.png) no-repeat 50%;
		background-size: 28rpx 28rpx;
		z-index: 9;
	}


	.idolBox .idolAvatar {
		margin-top: 20rpx;
		margin-left: 20rpx;
	}

	.idolAvatar {
		margin-right: 14rpx;
		width: 56rpx;
		height: 56rpx;
		line-height: 56rpx;
		background: #eef5ff;
		border-radius: 50%;
	}


	.bottomPart .heatNum {
		font-size: 24rpx;
		font-weight: 400;
		color: #333;
		text-align: right;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
		display: flex;
		flex-flow: row nowrap;
		justify-content: flex-end;
		align-items: center;
	}


	.heatLogo {
		margin-right: 4rpx;
		width: 16rpx;
		height: 22rpx;
		background: url(https://ohudong.cztv.com/1/257934/images/heatNumLogo.png) no-repeat 0;
		background-size: 100% 100%;
	}

	.bottomPart .vote,
	.searchList .vote {
		margin-left: 30rpx;
		background: #68adff;
	}
</style>
